//
//  ModelManager.h
//  McRemote
//
//  Created by Magic on 1/31/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@class Group;
@class Command;

@interface ModelManager : NSObject

+ (ModelManager *)sharedManager;

- (void)loadAllGroups;

- (Group *)groupForName:(NSString *)name;

- (Group *)addGroupWithName:(NSString *)name;

- (Command *)addCommandWithTitle:(NSString *)title 
                    keycode:(int32_t)keycode
                       flag:(int32_t)flag
                      index:(int32_t)index
                       icon:(NSString *)icon
                      group:(Group *)group;

- (void)removeCommand:(Command *)command;
- (void)saveUpdates; //after updating a command or a group

- (void)addCommandWithGroup:(Group *)group editable:(BOOL)editable properties:(NSDictionary *)dic;

@end
